package com.example.controller;

import com.example.pojo.Result;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ServeController
    {
        @GetMapping("/api/old/drug")
        public String drug(){
            String json = "{\n" +
                    "  \"code\": 1,\n" +
                    "  \"msg\": \"string\",\n" +
                    "  \"data\": {\n" +
                    "    \"records\": [\n" +
                    "      {\n" +
                    "        \"drugName\": \"板蓝根\",\n" +
                    "        \"effect\": \"清热解毒，凉血利咽\",\n" +
                    "        \"function\": \"尚不明确\",\n" +
                    "        \"dosage\": \"口服。一次1-2袋，一日3-4次。\",\n" +
                    "        \"precautions\": \"忌烟酒、辛辣、鱼腥食物。\",\n" +
                    "        \"shelfLife\": \"24个月\",\n" +
                    "        \"time\": \"17:30\",\n" +
                    "        \"date\": \"2024/11/15\",\n" +
                    "        \"id\": 1\n" +
                    "      }\n" +
                    "    ]\n" +
                    "  }\n" +
                    "}";



            return json;
        }
    }
